package work.lianwei;

import core.util.TransformCsvData;

import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author Gong.Yang
 */
public class MaxuanDemo {
    static String prefix = "E:\\学习资料\\java\\javademo\\java-demo\\javademo\\demo-jvm\\" + "新建文本文档";
    static String file = prefix + ".csv";

    public static void main(String[] args) {
        AtomicInteger len = new AtomicInteger();
        Set<String> set = new HashSet<>();
        TransformCsvData.peekCsv(file, 0, x -> {
            len.getAndIncrement();
            if (!set.add(x[0])) {
                System.out.println(x[0]);
            }
        });
        System.out.println(set.size());
        System.out.println(len);
    }
}
